package com.yuexun.beilunpatient.ui.my.ui;

import android.content.Intent;
import android.view.View;

import com.yuexun.beilunpatient.R;
import com.yuexun.beilunpatient.base.BaseKJActivity;
import com.yuexun.beilunpatient.config.AppConfig;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by work-jx on 2016/8/5.
 */
public class Act_Share extends BaseKJActivity {


    @Override
    public void setRootView() {
        setContentView(R.layout.act_share);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.back, R.id.share_btn})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.share_btn:
                Intent intent = new Intent(Intent.ACTION_SEND);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                intent.putExtra(Intent.EXTRA_TEXT, AppConfig.WEB_APP_SHARE); // 附带的说明信息
                intent.setType("text/plain"); // 分享文本
                startActivity(Intent.createChooser(intent, "分享"));
                break;
        }
    }
}
